#include <windows.h>
#include "desktop.h"

void OnShortcutClick(Link sc)
{
	WIN32_FIND_DATA   wfd;
	HANDLE       hFile=NULL; 
	hFile=FindFirstFile(sc->exec, &wfd); 
	if(hFile   !=INVALID_HANDLE_VALUE   &&   hFile   !=NULL)  
	{
		FindClose(hFile); 

		SHELLEXECUTEINFO   sei;
		ZeroMemory(&sei,   sizeof(SHELLEXECUTEINFO));
		sei.cbSize   =   sizeof(SHELLEXECUTEINFO);  
		sei.lpFile   =   sc->exec;
		sei.nShow   =   SW_SHOW;
		ShellExecuteEx(&sei); 
	}
}